package com.sang.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class HelloController {

    @RequestMapping("/hello")
    public String hello(Model model) {
        //封装数据
        model.addAttribute("msg","Hello,SpringMVCAnnotation");
        return "hello";//返回视图经过视图解析器拼接之后请求静态页面
    }

}
